//表单数据验证JS
export function formRule() {
    return {

        title: [
            {
                required: true,
                message: `请设置图文标题`

            },

            {
                max: 100,
                message: `标题长度不能超过100个字符`

            },

        ],

        digest: {
            required: false,
            max: 80,
            message: `图文摘要字数不能超过80个字符`

        },
        thumbMediaId: {
            required: true,
            message: `请选择或者上传一个封面图片`
        },
        author: [
            {
                required: true,
                message: `请设置文章作者`
            },
            {
                max: 20,
                message: `图文作者名称不能超过20个字符`
            }
        ],

        contentSourceUrl: {
            type: 'url',
            required: false,
            message: `请输入正确的URL地址`

        },
        content: [
            {
                required: true,
                message: `正文不能为空`
            },
            {
                max: 20000,
                message: "正文长度不能超过2万个字符"
            }
        ]
    }
}
